package com.example.a16478095zxl;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.service.autofill.OnClickAction;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
        Button btnMedia,btnPhoto;
       @Override
        protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        btnPhoto.setOnClickListener(this);
        btnMedia.setOnClickListener(this);
    }

    private void initView() {
        btnMedia=findViewById(R.id.btn_media);
        btnPhoto=findViewById(R.id.btn_photo);

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_photo:
                Intent intent=new Intent(MainActivity.this,SurfaceActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_media:
                Intent intentTwo=new Intent(MainActivity.this,MediaActivity.class);
                startActivity(intentTwo);
                    break;
        }
    }
}
